import axios from "axios";
import { BASE_URL } from "../Constant";

const SHOPPINGCAR_BASE_URL = BASE_URL + '/shopping-car'

export const addShoppingCarAPi = (data:any) => {
    return axios.post(
        SHOPPINGCAR_BASE_URL + '/add',
        data
    )
}

export const listShoppingCarApi = (userName:string) => {
    return axios.get(
        SHOPPINGCAR_BASE_URL + `/list?userName=${userName}`
    )
} 
export function delShoppingCar(data:any) {
    return axios.post(
        SHOPPINGCAR_BASE_URL + '/del',
        data)
}
export function buyShoopingCar(data:any){
    return axios.post(
        SHOPPINGCAR_BASE_URL + '/buy',
        data
    )
}

